export FALCON_HOME=/home/work
export WORKSPACE=$FALCON_HOME/open-falcon
mkdir -p $WORKSPACE

wget -N -c https://github.com/open-falcon/falcon-plus/releases/download/v0.2.1/open-falcon-v0.2.1.tar.gz
tar -xzvf open-falcon-v0.2.1.tar.gz -C $WORKSPACE

git clone --depth=1 https://github.com/open-falcon/dashboard.git


cd $WORKSPACE
grep -Ilr 3306  ./ | xargs -n1 -- sed -i 's/real_user:real_password/real_user:real_password/g'

cd $WORKSPACE
./open-falcon start

# 检查所有模块的启动状况
./open-falcon check

